/*******************************************************************
 *
 * Copyright (C), 2022-2027, YouGan, All rights reserved.
 *
 * Author      : zhaoyang
 * Create Time : 2022-10-13
 * Version     : v0.1
 * Description : 
 *******************************************************************/

#ifndef _HR_TASK_H_
#define _HR_TASK_H_

/*----------------------------Head file----------------------------*/
#include "stdint.h"
#include "stdbool.h"

/*----------------------------macro file---------------------------*/

/*----------------------------type define--------------------------*/

typedef enum {
	HR_EVT_NULL = 0,
	HR_EVT_INT,
	HR_EVT_START_MEASURE,
	HR_EVT_STOP_MEASURE,
	HR_EVT_BLE_CMD_PARSE,
	HR_EVT_ACC_COLLECT,
	HR_EVT_SLEEP,
	HR_EVT_MAX,
}hr_evt_t;

typedef enum {
	HR_MSG_NULL = 0,
	HR_MSG_MAIN_HR_TYPE,
} hr_msg_main_t;

typedef struct
{
    uint16_t type;
    uint16_t subtype;
    union
    {
        uint32_t  param;
        void     *buf;
    } u;
} T_IO_MSG;

/*----------------------------var define---------------------------*/

/*-------------------------func declaration------------------------*/
extern void hr_main_task(void* arg);
extern void hr_task_msg_send(uint8_t subtype);

/*-----------------------------------------------------------------*/

#endif

